cmake_minimum_required(VERSION 3.12)
project(peer_client)
project(peer_server)

add_definitions("/DWIN32_LEAN_AND_MEAN" "/DWIN32" "/DWEBRTC_WIN" "/D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS  ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
message("current dir"  ${CMAKE_CURRENT_SOURCE_DIR})
aux_source_directory(./client CLIENT_SOURCE)
message(info ${CLIENT_SOURCE})
aux_source_directory(./server SERVER_SOURCE)
message(info ${SERVER_SOURCE})

link_directories("D:/project/c++/generallib/test/src/webrtcdemo/third/lib")
link_directories("../third/opencv/staticlib")
link_directories("../third/absl/lib")



message(info "D:/project/c++/generallib/test/src/webrtcdemo/third/include")
include_directories("D:/project/c++/generallib/test/src/webrtcdemo/third/include")

add_executable(peer_client ${CLIENT_SOURCE})
add_executable(peer_server ${SERVER_SOURCE})

target_link_libraries(peer_client libwebrtc.lib ws2_32.lib winmm.lib 	DXGI.lib)
target_link_libraries(peer_server libwebrtc.lib ws2_32.lib winmm.lib 
	DXGI.lib 
    absl_base.lib
    absl_flags_config.lib
    absl_flags.lib 
    absl_flags_commandlineflag.lib
    absl_flags_commandlineflag_internal.lib
    absl_flags_internal.lib
    absl_flags_marshalling.lib
    absl_flags_parse.lib
    absl_flags_usage_internal.lib 
    absl_flags_private_handle_accessor.lib 
    absl_flags_program_name.lib
    absl_flags_reflection.lib
    absl_flags_usage.lib
    absl_hash.lib
    absl_hashtablez_sampler.lib
    absl_raw_hash_set.lib
    absl_low_level_hash.lib
    )
